|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.common.services.VariableRegistry
public class VariableRegistry
A support implementation of the IVariableRegistry interface.
| Constructor Summary | |
|---|---|
VariableRegistry(ISessionContext context,
IDataTypeRegistry dataTypeRegistry)
Creates a new VariableRegistry. |
|
| Method Summary | |
|---|---|
boolean |
clearEntry(java.lang.String name)
|
boolean |
clearItem(int index)
|
void |
clearVariable(java.lang.String name)
Removes the registration of the variable under the specified name |
IDataObject |
createVariable(IDataType type)
Creates a new variable of the specified type. |
IDataObject |
createVariable(java.lang.String typeName)
Creates a new variable of the specified type. |
java.lang.Object |
getEntry(java.lang.String name)
|
java.lang.String[] |
getFunctionNames()
|
java.lang.Object |
getItem(int index)
|
java.lang.String |
getName()
|
IDataObject |
getVariable(java.lang.String name)
Returns the variable registered under the specified name or null if no such variable is registered. |
java.lang.String[] |
getVariableNames()
Returns the names of all the variables currently registered. |
boolean |
hasEntry(java.lang.String name)
|
boolean |
hasItem(int index)
|
boolean |
hasValue()
|
java.lang.Object |
invokeFunction(java.lang.String name,
java.lang.Object[] arguments)
|
boolean |
setEntry(java.lang.String name,
java.lang.Object value)
|
boolean |
setItem(int index,
java.lang.Object value)
|
void |
setVariable(java.lang.String name,
IDataObject variable)
Registers a variable under the specified name, removing any variable previously registered under that name. |
java.lang.Object |
toValue()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableRegistry(ISessionContext context,
IDataTypeRegistry dataTypeRegistry)
context - The context to use.dataTypeRegistry - The data type registry to use.| Method Detail |
|---|
public final IDataObject createVariable(java.lang.String typeName)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
IVariableRegistry
createVariable in interface IVariableRegistrytypeName - The name of the type of variable to create.
java.lang.IllegalArgumentException - If no type with the specified name exists.
java.lang.NullPointerException - If the supplied type name is null.
public final IDataObject createVariable(IDataType type)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
IVariableRegistry
createVariable in interface IVariableRegistrytype - The type of variable to create.
java.lang.NullPointerException - If the supplied type is null.
java.lang.IllegalArgumentExceptionpublic final java.lang.String[] getVariableNames()
IVariableRegistry
getVariableNames in interface IVariableRegistry
public final IDataObject getVariable(java.lang.String name)
throws java.lang.NullPointerException
IVariableRegistrynull if no such variable is registered.
getVariable in interface IVariableRegistryname - The name of the variable to return.
null if no such variable is registered.
java.lang.NullPointerException - If the supplied variable name is
null.
public final void setVariable(java.lang.String name,
IDataObject variable)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
IVariableRegistry
setVariable in interface IVariableRegistryname - The name to register the variable under.
java.lang.IllegalArgumentException - If the supplied variable was not created
by this registry.
java.lang.NullPointerException - If the supplied variable name is
null.
public final void clearVariable(java.lang.String name)
throws java.lang.NullPointerException
IVariableRegistry
clearVariable in interface IVariableRegistryname - The name of the variable to clear.
java.lang.NullPointerException - If the supplied variable name is
null.public final java.lang.String getName()
getName in interface IScriptablepublic boolean hasValue()
hasValue in interface IScriptablepublic java.lang.Object toValue()
toValue in interface IScriptablepublic final java.lang.String[] getFunctionNames()
getFunctionNames in interface IScriptable
public final java.lang.Object invokeFunction(java.lang.String name,
java.lang.Object[] arguments)
invokeFunction in interface IScriptablepublic final boolean hasItem(int index)
hasItem in interface IScriptablepublic final boolean hasEntry(java.lang.String name)
hasEntry in interface IScriptablepublic final java.lang.Object getItem(int index)
getItem in interface IScriptablepublic final java.lang.Object getEntry(java.lang.String name)
getEntry in interface IScriptable
public final boolean setItem(int index,
java.lang.Object value)
setItem in interface IScriptable
public final boolean setEntry(java.lang.String name,
java.lang.Object value)
setEntry in interface IScriptablepublic final boolean clearItem(int index)
clearItem in interface IScriptablepublic final boolean clearEntry(java.lang.String name)
clearEntry in interface IScriptable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||